package com.pomr.util.common;

import com.alibaba.fastjson.JSON;
import com.pomr.entity.UserEffect;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class CommonData {
	public static Map<String, Object> data = new HashMap<String, Object>();

	/**
	 * 获取用户权限
	 * @param userid
	 * @return
	 */
	public static UserEffect getUserEffect(Integer userid){
		List<UserEffect> effects = (List) CommonData.data.get("Effect");
		for(UserEffect ue:effects){
			if(ue.getUser().getId() == userid){
				return ue;
			}
		}
		return null;
	}

}
